admin server测试

启动mpush服务
运行ServerTestMain#testServer(),控制台日志会打印如下:

1
11:47:00.097 - [mp-admin-boss-6-1] INFO  - com.mpush.core.server.AdminServer - server start success on:3002

telnet连接到mpush admin控制台

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
➜  ~ telnet 172.16.177.134 3002
Trying 172.16.177.134...
Connected to 172.16.177.134.
Escape character is '^]'.
Welcome to MPush Console [172.16.177.134]!
since 2018-12-26T11:47:00.087 has running 0(h)

It is Wed Dec 26 11:47:29 CST 2018 now.

help
Option Description
------ -----------
help show help
quit exit console mode
shutdown stop mpush server
restart restart mpush server
zk:<redis, cs ,gs> query zk node
count:<conn, online> count conn num or online user count
route:<uid> show user route info
push:<uid>, <msg> push test msg to client
conf:[key] show config info
monitor:[mxBean] show system monitor
profile:<1,0> enable/disable profile


count conn
0

push
unsupported option

route user01
user [user01] offline now.

profile 1
Profiler enabled

quit
have a good day!

Connection closed by foreign host.
➜ ~

mpush 后台输出日志:

1
2
3
4
5
6
12:06:33.915 - [mp-admin-work-7-1] INFO  - com.mpush.core.handler.AdminHandler - receive admin command=help
12:06:45.343 - [mp-admin-work-7-1] INFO - com.mpush.core.handler.AdminHandler - receive admin command=count conn
12:07:23.878 - [mp-admin-work-7-1] INFO - com.mpush.core.handler.AdminHandler - receive admin command=push
12:08:14.383 - [mp-admin-work-7-1] INFO - com.mpush.core.handler.AdminHandler - receive admin command=route user01
12:08:35.749 - [mp-admin-work-7-1] INFO - com.mpush.core.handler.AdminHandler - receive admin command=profile 1
12:10:26.446 - [mp-admin-work-7-1] INFO - com.mpush.core.handler.AdminHandler - receive admin command=quit

------ 本文结束 感谢您的阅读 ------